import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
@Entity("message")
export class MessageEntity {
    @PrimaryGeneratedColumn()
    id:number; // 标记为主列，值自动生成

    @Column({
        type: "int",
        name:'fromId'
    })
    fromId: number;

    @Column({
        type: "int",
        name:'toId'
    })
    toId: number;

    @Column({
        type: "varchar",
        name:'content'
    })
    content: string;
    @Column({
        type: "datetime",
        name:'date'
    })
    date: Date;
    @Column({
        type:"int",
        name:'read'
    })
    read: number
    @Column({
        type:"int",
        name:'houseId'
    })
    houseId: number
}